﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ITAP.ContourBuilder.Components.Constraints
{
    [Serializable]
    public class ConstraintClearElementInvalidModifiedFlag : Constraint
    {
        public override bool Check(IContourComponent component)
        {
            return false;
        }

        public override void Fix(IContourComponent component)
        {
            ContourElement element = component as ContourElement;
            if(element.Modified && (element.SelectedPoint == ContourElementPoints.Center || element.SelectedPoint == ContourElementPoints.None))
                element.Modified = false;
        }
    }
}
